package 比屋作业.day17;
import java.util.*;
public class D17_2 {
    public static void main(String[] args) {
    LinkedList<String> stack =new LinkedList<>();
    stack.push("北京");
    stack.push("上海");
    stack.push("广州");
        System.out.println("从栈中弹出："+stack.pop());
        System.out.println("从栈中弹出："+stack.pop());
        System.out.println("从栈中弹出："+stack.pop());
        LinkedList<String> queue=new LinkedList<>();
        queue.offer("北京");
        queue.offer("上海");
        queue.offer("广州");
        System.out.println("从队列中去出："+queue.poll());
        System.out.println("从队列中去出："+queue.poll());
        System.out.println("从队列中去出："+queue.poll());
    }
}
